﻿/**************************************************************
 * Description:
 * ItemBListUIModelAction.cs
 * Product: U9
 * Co.    : UFIDA Group
 * Author : Auto Generated
 * version: 2.0
 **************************************************************/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using UFSoft.UBF.Util.Log;
using UFSoft.UBF.UI.MD.Runtime;
using UFSoft.UBF.UI.ActionProcess;
using UFSoft.UBF.UI.IView; 
using System.Data;
using UFIDA.UBF.Query.CommonService;
using UFSoft.UBF.UI.FormProcess;
using UFSoft.UBF.UI.ControlModel;
using UFIDA.UBF.Query.CommonService.QueryStrategy;
using UFIDA.UBF.Query.CaseModel;
using UFIDA.U9.UI.PDHelper;
using UFSoft.UBF.ExportService;

namespace UFIDA.U9.Learn.ItemBListUIModel
{
	public partial class ItemBListUIModelAction : BaseAction
	{
		private static readonly ILogger logger = LoggerManager.GetLogger(typeof(ItemBListUIModelAction));
		//强类型化基类Model属性.
		public new ItemBListUIModelModel CurrentModel 
		{
			get {
				return (ItemBListUIModelModel)base.CurrentModel;
			}
			set {
				base.CurrentModel = value ;
			}
		}
		
		public ItemBListUIModelAction(IPart part) : base(part)
		{
		}
		//Model参数的构造,用于测试用例.
		public ItemBListUIModelAction(ItemBListUIModelModel model) : base(model)
		{
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnLookCase(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnLookCase_Extend);
		}
		private void OnLookCase_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:QryClick
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("QryClick",this,sender,e);

	  
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnCaseChanged(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnCaseChanged_Extend);
		}
		private void OnCaseChanged_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	        QryService.OnCaseChangedDefault("DDLCase", this.CurrentPart);
		QueryAdjust();
	 

		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnOutPut(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnOutPut_Extend);
		}
		private void OnOutPut_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:OnOutPut
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("OnOutPut",this,sender,e);

	  
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnGridRowDbClick(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnGridRowDbClick_Extend);
		}
		private void OnGridRowDbClick_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 

		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnNew(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnNew_Extend);
		}
		private void OnNew_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 

		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnPrint(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnPrint_Extend);
		}
		private void OnPrint_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:OnPrint
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("OnPrint",this,sender,e);

	  
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnDelete(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnDelete_Extend);
		}
		private void OnDelete_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:ListDeleteClick
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("ListDeleteClick",this,sender,e);

	  
		}
		#region Action的内置两个Action.
		/// <summary>
		/// Help: 数据加载(发生在Form的初始化加载时)
		/// </summary>
		public void OnLoadData(object sender, UIActionEventArgs e)
		{
			//UBF扩展处...
			this.OnLoadData_Extend(sender,e) ;
		}
		private void OnLoadData_DefaultImpl(object sender, UIActionEventArgs e)
		{
		   
		     InitCaseModel();
				}
		/// <summary>
		/// Help: 数据收集(发生在Form的CallBack或者是PostBack时)
		/// </summary>
		public void OnDataCollect(object sender, UIActionEventArgs e)
		{
			//UBF扩展处...
			this.OnDataCollect_Extend(sender,e) ;
		}
		private void OnDataCollect_DefaultImpl(object sender, UIActionEventArgs e)
		{
		    UFIDA.U9.UI.Commands.CommandFactory.DoCommand("DataCollect",this,sender,e);
		}
		#endregion
         

            
        #region BE列表自动产生的代码
        
		public void QueryAdjust()
		{
			IUFDataGrid UIGrid = this.CurrentPart.GetUFControlByName(this.CurrentPart.TopLevelContainer, "DataGrid1") as IUFDataGrid;

			BEQueryStrategyImpl beQryStrategyImpl = new BEQueryStrategyImpl(this.CurrentState, "UFIDA.U9.Learn.ItemBE.ItemBE", "722da6a4-593b-4397-9407-590905c7bc9a", UIGrid.UIView, UIGrid, 1);

			beQryStrategyImpl.Adjust();
		    
			AfterQryAdjust_Extend(UIGrid);

			UIGrid.UIView.CurrentFilter.OPath = CustomFilterOpath_Extend(QryService.GetDefaultOpath((BaseWebForm)(this.CurrentPart)));
			UIGrid.UIView.CurrentFilter.OrderBy = QryService.GetOrderByOpath((BaseWebForm)(this.CurrentPart));

			UIGrid.UIView.Clear();
			this.NavigateAction.FirstPage(null);

			//20090316 UBF2.9_查询_yzx_修改查询设计器的tpl_用于显示多webpart查询的IE状态栏提示信息
			QryService.ShowQueryInfoInIEStatusBar((BaseWebForm)this.CurrentPart, UIGrid.UIView);
		}

		public void InitCaseModel()
		{
			QryService.ClearSession((UFSoft.UBF.UI.FormProcess.BaseWebForm)(this.CurrentPart));
			IUFDataGrid UIGrid = this.CurrentPart.GetUFControlByName(this.CurrentPart.TopLevelContainer, "DataGrid1") as IUFDataGrid;
			BEQueryStrategyImpl beQryStrategyImpl = new BEQueryStrategyImpl(this.CurrentState, "UFIDA.U9.Learn.ItemBE.ItemBE", "722da6a4-593b-4397-9407-590905c7bc9a", UIGrid.UIView, UIGrid, 1);
			beQryStrategyImpl.QueryComponentXMLCompressed = @"7VZLbyNFEA4XLtz4BdbcO+l3T0tJVht7I1lKSEji3PtRnRjGM9Z4vEluu6c9BZAQK5A48JJAQkJI
HDhA/k0e7K+AHj+C4yiQ1XJBSh3cU9XT/XV9/U2VF95aWFj4M1o91vZ2/fDtu8uPjntZ4ymUg26R
ryRkEScNyF3hu/nBSjKsAkqTR6vL7w+hPGkWvX6RQ141un4l8cxZz0RAmDiBuAscaS0kUkEDk14J
muqkkZserCTtCnpJw3cH/cycvDcbgoEru/1qBJ40DiHr1+MIbu+kH9/b6A6qSaCz015JFKXeSMOR
0MwizrRCmmMVXayxcMo6bSbv7xbD0sH6MMvGkJ31duvxYkcvboAp88X6BGtPJkPS6LT3u3DUKs3B
GLh+ahVHedLYgdDOQ7FRGD+eahp3CMnq8poZdF09NSJEGymAWY8Y5gZx7QAZywFhjsExjgkRdkrI
HBl3EhGh94oPYRTbKYqqFV9rFnkFx9W+yYajpevdrIJyz9j97qBrsxjbK4eQNJpFNuzlt+O7RVnd
jo53eXLcN7nfgKeQrSRsusd8tN5hPrYU6dieMDWig1CDrVICYRBRH1RYZKNiEEmFcgRrLrh6XTq2
y+IDcFW7NeNsm+qwdte265scT61tb/WhNPXycaC1tzWdeXwQFdzKshkv7nR8UvsxiU57NgnDrPaO
GmSCjHcaGEdWEo4As1QH5xR4/V8m0WlvFh6yaSagmHUGImiqAHERMLKWOaQMoyF1VqeB1YvWi7I3
XaOU5oEYgSSHeGTPVOSdMKQ4WEqpTElK/gaqQUjgBJhGAoOOumUUpQFrhLGnOHjhAugRNS0IZphV
TTOAifbHohnc8Ea8AWMeuzSWBBNI3JNrpC2pL5+kRqaeGg1T3prxIHPcXf3+8uqr53cyuHQbEIdA
Q5AUeWYY4phGzoigiGrtuNLOB0KngDXGHODFJ6dX3//8OoDeSyEj14goEWlOIcrbCEBEM29ASMbt
tbw7W5tzeH/89PWrFx9fnH52fnb6T6hLN2me3sDoq4z++GF0HgvEpSGqJP5Gqch4gVqaWL7BWpDa
htSQN2J8BgsCiYpisdIF6aLEgCKTMoGI1dpjC2AleyOyZ/NiEhhEJZtY3hEHF1OiKkVSeaq9tp7o
a543oVfMY3334vKXH+6JJTEYCy7eKYc0iigSaZzxkUOuMdMWx5Yz29LqbjCHd/nyi4tPn1+cfXP5
7L5saik9JmmKAIKMNcYSlIpAUQDnnbTesOCvMzTH22XX3UL98tmrHz8//+3Xe0LGjyFmamLrVLGB
c4/rAqc1otIYKQ3jKb8uaxvF0R2Q52cf/Qvk0rxgJ37dQKJXD2PiBfEOK4oUiZLlpG7qDOO6ZsX6
I0QI+vrrbZZgKvBb+X3r7ajfjVv6k93mjXNNzrF0o7It3fyzs/rOwoM92IM92IM92P/U/gI=";
		    
			BeforeGetQryModel_Extend(beQryStrategyImpl);
		    
			CaseModel caseModel = beQryStrategyImpl.GetQryModel();
		    
			AfterGetQueryModel_Extend(caseModel);
		    
			QryService.SetCaseModelToSession((BaseWebForm)(this.CurrentPart), caseModel);
		}
        
        
         #endregion
         

	}
}
